package x.com;

import java.awt.List;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;
import java.util.Vector;

class ccCar
{
    int modle;
    
    
    public ccCar(int a, String n)
    {
        this.modle = a;
      
        
    }
    
    //Getter
    public int getModle()
    {
        return this.modle;
    }
    
   
    //Setter
    public void setModle(int m)
    {
        this.modle=m;
    }
    
 
    public String StringTo()
    {
        return "------------"+this.modle;
    }
    
}

public class test2
{
    public static void main (String args[])
    {
        ccCar a1=new ccCar(1101, "Riz");
        ccCar a2=new ccCar(1007, "City");
        
        Set<ccCar> vec = new TreeSet<ccCar>();
        
        vec.add(a1);
        vec.add(a2);
        
        System.out.println(vec);
        
        for(ccCar a: vec)
        {
            System.out.println("------------"+a.modle);
        }
    }
}
